package org.jeecg.modules.pbmp.reimbursementInfo.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.pbmp.reimbursementInfo.entity.ReimbursementInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 报销单管理
 * @Author: jeecg-boot
 * @Date:   2021-01-30
 * @Version: V1.0
 */
public interface ReimbursementInfoMapper extends BaseMapper<ReimbursementInfo> {

    public List<ReimbursementInfo> pageReimbursementList(Page<ReimbursementInfo> page, @Param("ReimbursementInfo") ReimbursementInfo reimbursementInfo);

    /**
     *  通过主表外键批量删除
     * @param reimbursementId
     * @return
     */
    @Delete("DELETE FROM pbmp_traffic_stay WHERE reimbursement_id = #{reimbursementId}")
    public boolean deleteTrafficById(String reimbursementId);

    /**
     *  通过主表外键批量删除
     * @param reimbursementId
     * @return
     */
    @Delete("DELETE FROM pbmp_travel_allowance WHERE reimbursement_id = #{reimbursementId}")
    public boolean deleteTravelById(String reimbursementId);

}
